package be.ad.coffeebreak.web;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * A command.
 *
 * @author Stefan Bangels
 */
public interface Command {

    /**
     * Execute the command using the specified http request and response.
     *
     * @param request  the http request
     * @param response the http response
     * @return the view that has to be dispatched, or null
     * @throws ServletException
     * @throws IOException
     */
    public String execute(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException;

}
